package com.example.serviceImpl;

import com.example.bean.Book;
import com.example.mapper.BookMapper;
import com.example.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {

    @Autowired
    private BookMapper bookMapper;

    @Override
    public Book selectBookById(String id) {
        return bookMapper.selectBookById(id);
    }

    @Override
    public List<Book> selectBookByName(String bookName) {
        return bookMapper.selectBookByName(bookName);
    }

    @Override
    public List<Book> selectBook() {
        return bookMapper.selectBook();
    }

    @Override
    public int insertBook(Book book) {
        return bookMapper.insertBook(book);
    }

    @Override
    public int deleteBook(String id) {
        return bookMapper.deleteBook(id);
    }

    @Override
    public int updateBook(Book book) {
        return bookMapper.updateBook(book);
    }
}
